#!/bin/sh
set -e
set -o pipefail

SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

${SCRIPTPATH}/sdbus-c++-unit-tests 2>&1 | \
sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'

${SCRIPTPATH}/sdbus-c++-integration-tests 2>&1 | \
sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' 
